﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.ServiceModel;
using System.ServiceModel.Description;
using System.ServiceProcess;
using ServiceDesk.Service;
using ServiceDesk.DAL;
using ServiceDesk.Model;
using log4net;
using log4net.Config;

namespace ServieDeskServiceHost
{
    class Program
    {
        static void Main(string[] args)
        {
            XmlConfigurator.Configure();// log4net
            ServiceDeskServiceImplementation.SessionFactory = new ServiceDeskSessionFactory();// TODO передавать это через параметры конструктора
            using (ServiceHost host = new ServiceHost(typeof(ServiceDeskServiceImplementation)))
            {
                host.Open();
                Console.WriteLine("Press <Enter> to stop the service.");
                Console.ReadLine();
                host.Close();
            }
        }
    }
}
